import React from 'react';
import { Provider } from 'react-redux';
import store from '@/Store/index'
import { HashRouter, Switch, Route, Redirect } from 'react-router-dom'
import Home from '@/Pages/Home/index'
import Detail from '@/Pages/Detail/index'
import User from '@/Pages/User'
import Loading from '@/components/Loading'
import NavBar from '@/components/Header'
import Footer from '@/components/Footer'
import '@/assets/css/reset.css'
import '@/assets/css/project.css'
import '@/utils/fonrRem.js'
import 'antd/dist/antd.css';
import { BackTop } from 'antd';

function App() {
    return (
        <Provider store={store}>
            <HashRouter>
                <NavBar />
                <Loading />
                <Switch>
                    <Route path='/home/:type/:page' component={Home}></Route>
                    <Route path='/detail/:id' component={Detail}></Route>
                    <Route path='/user/:id' component={User}></Route>
                    <Redirect to='/home/all/1'></Redirect>
                </Switch>
                <Footer />
                <BackTop />
            </HashRouter>
        </Provider>
    )
};
export default App;